<template>
  <div class="login" :style="'background-image:url(' + Background + ');'">
    <div class="el-divider--vertical">
      <h1 class="title">成理工程学习平台</h1>
      <el-tabs
        v-model="activeName"
        :stretch="true"
        type="border-card"
        @tab-click="handleClick"
        style="opacity: 0.97; border-radius: 10px"
      >
        <el-tab-pane label="学生登录" name="first">
          <in urlType="student" title="学号" @isfindpwd="setFindPwd"></in>
        </el-tab-pane>
        <el-tab-pane label="老师登录" name="second">
          <in urlType="teacher" title="工号"></in>
        </el-tab-pane>
        <!-- <el-tab-pane label="注册" name="third">
            <registered></registered>
          </el-tab-pane> -->
      </el-tabs>
    </div>
    <div>
      <el-dialog
        title="密码找回"
        :visible.sync="isfindpwd"
        width="30%"
        :close-on-click-modal="false"
      >
        <findpwd></findpwd>
        <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogVisible = false"
            >确 定</el-button
          >
        </span>
      </el-dialog>
    </div>
  </div>
</template>
<script>
import In from "./login/in";
import Registered from "./login/registered";
import Background from "@/assets/images/bg.jpeg";
export default {
  name: "Login",
  components: { Registered, In },
  data() {
    return {
      isfindpwd: false,
      activeName: "first",
      Background: Background,
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    setFindPwd(judge) {
      alert(judge);
    },
  },
  create() {
    console.log("login++++++++++++++++");
  },
};
</script>

<style rel="stylesheet/scss">
/* @import "../assets/style/layout/layout.css"; */
.login {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
}
.el-divider--vertical {
  width: 450px;
  margin: 0 auto auto;
  /* position: absolute;
  height: 600px;
  top: 45%;
  border-radius: 10px;
  transform: translate(-50%, -50%); */
}
.title {
  margin: 0 auto 30px auto;
  margin-top: 20px;
  text-align: center;
  color: #707070;
}
</style>
